package com.left.tcc.coupon.controller;

import com.left.tcc.coupon.api.CouponApi;
import com.left.tcc.coupon.dto.CouponDTO;
import com.left.tcc.coupon.service.CouponService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
public class CouponController implements CouponApi {
    @Autowired
    private CouponService couponService;
    @Override
    public String decrease(CouponDTO obj) {
        log.info("=====优惠券控制器...");
        couponService.decrease(obj);
        return "ok";
    }
}
